package com.walle.concurrenttest.pattern.singlethreadexecute;

/**
 * @author zhangjiapeng
 * @Package com.walle.concurrenttest.pattern.singlethreadexecute
 * @Description: ${todo}
 * @date 2019/2/18 10:45
 */
public class Gate {

    private int count = 0;


    public synchronized void pass(String name) throws InterruptedException {
        count++;
        System.out.println(String.format("第%d位，%s通过了门",count,name));
        Thread.sleep(200);
    }
}
